# Dockerfile for creating a self-contained Nginx image from a local build
# This Dockerfile assumes you have already run 'npm run build' locally.

FROM registry.cn-hangzhou.aliyuncs.com/pull-image/nginx:1.21.6

# A label to clarify the image's purpose
LABEL description="Serves the static site from a pre-built 'out' directory."

# Copy the pre-built 'out' directory from your local machine into the image
COPY ./out /usr/share/nginx/html

# Copy the Docker-specific Nginx configuration
COPY ./nginx.docker.conf /etc/nginx/conf.d/default.conf

# Expose port 7325 for the web server
EXPOSE 7325

# The default command to start Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]
